//
//  PrefixHeader.h
//  Molian
//
//  Created by 胡津 on 15/3/16.
//  Copyright (c) 2015年 xiaocan. All rights reserved.
//

#ifndef Molian_PrefixHeader_h
#define Molian_PrefixHeader_h




// 模型
#import "MLUser.h"
#import "MLGallery.h"
#import "MLAuthentication.h"
#import "MLWithdraw.h"
#import "MLFeedback.h"
#import "MLReportRecord.h"
#import "MLChatBackground.h"
#import "MLSleep.h"
#import "MLTopic.h"
#import "MLArticle.h"
#import "MLRecommendUser.h"
#import "MLUserLike.h"
#import "MLArticleLike.h"
#import "MLArticleComment.h"
#import "MLArticleShare.h"
#import "MLDate.h"
#import "MLPaidVoip.h"
#import "MLFriendApply.h"
#import "MLVoice.h"
#import "MLTask.h"
#import "MLConsumeRecord.h"
#import "MLCallRecord.h"
#import "UMSocial.h"
#import "MLCustomizationRecord.h"
#import "MLLovers.h"
#import "MLWebpageRecharge.h"
#import "MLInfoChangeNotify.h"
#import "MLException.h"
#import "MLSignRecord.h"
#import "MLGift.h"
#import "MLGiftRecord.h"
#import "MLSweetheart.h"
#import "MLSweetheartApply.h"
#import "MLIncomeRecord.h"
#import "MLCircle.h"

#import <AVOSCloudSNS.h>
#import <AVOSCloudSNS/AVUser+SNS.h>
//#import "EMSDKFull.h"
#import "EaseUI.h"
//#import "EaseMob.h"
#import <MobClick.h>

#import "ShareData.h"
#import "Utils.h"
#import <BFPaperButton.h>
#import <UIColor+BFPaperColors.h>
#import "UIImageView+WebCache.h"
#import "HUD.h"
#import <POP.h>

// 环信
#import "UIViewController+HUD.h"



#define MPKF @"mlsystem"

#define FontName      IS_IOS8 ? @".HelveticaNeueInterface-Regular" : @".HelveticaNeueInterface-M3"

//礼物的背景图片
#define kChat_Gitf_Receiver_Bg @"chat_gift_receiver_bg"
#define kChat_Gift_Sender_Bg @"chat_gift_sender_bg"

#define kFont(a) [UIFont fontWithName:FontName size:a]
#define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
//从本地加载图片
#define ReadImageFromBundle(a,b)  ([UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:a ofType:b]])

#define IS_IOS7 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7)
#define IS_IOS8 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8)

// 判断屏幕是否是iphone以上的大屏
#define IS_WIDESCREEN ( [ [ UIScreen mainScreen ] bounds ].size.height >= 568 )
#define IS_IPHONE_4 ( [ [ UIScreen mainScreen ] bounds ].size.height == 480 )
#define IS_IPHONE_5 ( [ [ UIScreen mainScreen ] bounds ].size.height == 568 )
#define IS_IPHONE_6 ( [ [ UIScreen mainScreen ] bounds ].size.height == 667 )
#define IS_IPHONE_6_PLUS ( [ [ UIScreen mainScreen ] bounds ].size.height == 736 )

#define TimeStamp [NSString stringWithFormat:@"%f",[[NSDate date] timeIntervalSince1970] * 1000]

#define RGBA(r,g,b,a) [UIColor colorWithRed:r/255.0f green:g/255.0f blue:b/255.0f alpha:a]// 获取RGB颜色
#define SelectViewClolor ([UIColor colorWithRed:246/255.0 green:89/255.0 blue:118/255.0 alpha:1])
#define DeviceWidth [UIScreen mainScreen].bounds.size.width//获取设备的物理宽度
#define DeviceHeight [UIScreen mainScreen].bounds.size.height//获取设备的物理高度
#define kMyTabBarHeight 49
#define kNavigationBarHeight (64)
#define EqualHeight(Width,Height,NeedWidth) Width*(NeedWidth)/Height
#define EqualWidth(Width,Height,NeedHeight) Height*(NeedHeight)/Width
//APP主色调
#define APPCOLOR(a) RGBA(246 , 108 , 149 , 1)
#define APPCOLORBACKGROUNDCOLOR(a) RGBA(239, 239, 244, 1)


#define WS(weakSelf)  __weak __typeof(self)weakSelf = self;

//0则生产环境
//#define APPENVIRONMENT 1

/*********************Apple IAP配置*********************/
#define IAP_ID_6_YUAN @"com.molianapp.molian.purchase_6_yuan"
#define IAP_ID_18_YUAN @"com.molianapp.molian.purchase_18_yuan"
#define IAP_ID_30_YUAN @"com.molianapp.molian.purchase_30_yuan"
#define IAP_ID_60_YUAN @"com.molianapp.molian.purchase_60_yuan"
#define IAP_ID_108_YUAN @"com.molianapp.molian.purchase_108_yuan"
#define IAP_ID_488_YUAN @"com.molianapp.molian.purchase_488_yuan"


//导航栏主题颜色
#define APP_THEME_NAV_COLOR @"themenavcolor"

/**************leancloud后台返回码***************/
#define AVOS_RES_CODE_SERVER_ERROR 1
#define AVOS_RES_CODE_SMS_CODE_INVALID 1
#define AVOS_RES_CODE_MOBILE_INVALID 127
#define AVOS_RES_CODE_PWD_ERROR 210           // 密码错误
#define AVOS_RES_CODE_USER_NOT_EXIST 211      // 用户不存在
#define AVOS_RES_CODE_PHONE_NOT_EXIST 213     // 手机号不存在（找回密码）
#define AVOS_RES_CODE_MOBILE_EXIST 214
#define AVOS_RES_CODE_PHONE_NOT_VERIFIED 215

/*************远程通知设置**************/
//新远程(通知群发的系统消息)
#define NOTIFICATION_TYPE_NEW_SYSYTEM_MASS_PUSH @"com.pocketsweet.NEW_SYSYTEM_MASS_PUSH"
//口袋恋人给你了新的推荐(编辑推荐的红点)
#define NOTIFICATION_TYPE_NEW_RECOMMEND_PUSH @"com.pocketsweet.NEW_RECOMMEND_PUSH"
//新的情感热线
#define NOTIFICATION_TYPE_NEW_CUSTOMAZITION_PUSH @"com.pocketsweet.NEW_CUSTOMAZITION_PUSH"
//打电话的
#define NOTIFICATION_TYPE_NEW_CALL_PUSH @"com.pocketsweet.NEW_CALL_PUSH"
//喜欢的
#define NOTIFICATION_TYPE_NEW_LIKE_PUSH @"com.pocketsweet.NEW_LIKE_PUSH"




//
// 申请成为认证用户的结果通知
#define NOTIFICATION_TYPE_AUTHENTICATE_SUCCEED @"com.pocketsweet.AUTHENTICATE_SUCCEED"
#define NOTIFICATION_TYPE_AUTHENTICATE_FAILD @"com.pocketsweet.AUTHENTICATE_FAILD"
// 申请提现的结果通知
#define NOTIFICATION_TYPE_WITHDRAW_SUCCEED @"com.pocketsweet.WITHDRAW_SUCCEED"
#define NOTIFICATION_TYPE_WITHDRAW_FAILD @"com.pocketsweet.WITHDRAW_FAILD"

// 服务成功,收到系统返现的通知
#define NOTIFICATION_TYPE_GET_SERVICE_INCOME @"com.pocketsweet.GET_SERVICE_INCOME"

// 修改聊天背景图片的通知
#define NOTIFICATION_TYPE_CHAT_BACKGROUND_UPDATED @"com.pocketsweet.CHAT_BACKGROUND_UPDATED"

/**************本地通知配置**************/
#define NOTIFICATION_TYPE_USER_INFO_UPDATED @"NOTIFICATION_TYPE_USER_INFO_UPDATED"

// 文件上传完成的通知
#define NOTIFICATION_TYPE_FILE_UPLOAD_FINISHED @"NOTIFICATION_TYPE_FILE_UPLOAD_FINISHED"

// 收到新消息之后的内部通知
#define NOTIFICATION_TYPE_NEW_MSG_RECEIVED @"NOTIFICATION_TYPE_NEW_MSG_RECEIVED"

// 登录成功的内部通知
#define NOTIFICATION_TYPE_LOGIN_SUCCEED @"NOTIFICATION_TYPE_LOGIN_SUCCEED"

// 退出登录的内容通知
#define NOTIFICATION_TYPE_LOGOUT_SUCCEED @"NOTIFICATION_TYPE_LOGOUT_SUCCEED"

// 账号未完成验证手机号的通知
#define NOTIFICATION_TYPE_LOGIN_MOBILE_PHONE_UNVERIFIED @"NOTIFICATION_TYPE_LOGIN_MOBILE_PHONE_UNVERIFIED"

// 账号未完成初始化的通知
#define NOTIFICATION_TYPE_LOGIN_UNSER_UNINITED @"NOTIFICATION_TYPE_LOGIN_UNSER_UNINITED"

//新消息通知
#define NOTIFICATION_TYPE_NEW_MSG_RECEIVED @"NOTIFICATION_TYPE_NEW_MSG_RECEIVED"


/**************环信自定义消息类型**************/
#define EMMESSAGE_EXT_NOTI_CALL_APPLY @"EMMESSAGE_EXT_NOTI_CALL_APPLY"   // 申请通话
#define EMMESSAGE_EXT_NOTI_CALL_APPLY_ACCEPTED @"EMMESSAGE_EXT_NOTI_CALL_APPLY_ACCEPTED"   // 申请通话被接受
#define EMMESSAGE_EXT_NOTI_FRIEND_APPLY @"EMMESSAGE_EXT_NOTI_FRIEND_APPLY"   // 好友申请
#define EMMESSAGE_EXT_NOTI_FRIEND_APPLY_ACCEPTED @"EMMESSAGE_EXT_NOTI_FRIEND_APPLY_ACCEPTED"   // 好友申请被接受

// 小灰条消息类型
#define EMMESSAGE_EXT_TYPE_CHAT_NOTIFICATION_MSG 1


//礼物
#define EMMESSAGE_EXT_TYPE_GIFT_MSG 3

#define EMMESSAGE_EXT_TYPE_CALL_APPLY @"EMMESSAGE_EXT_TYPE_CALL_APPLY"   // 申请通话
#define EMMESSAGE_EXT_TYPE_CALL_APPLY_ACCEPTED @"EMMESSAGE_EXT_TYPE_CALL_APPLY_ACCEPTED"   // 申请通话被接受
#define EMMESSAGE_EXT_TYPE_FRIEND_APPLY @"EMMESSAGE_EXT_TYPE_FRIEND_APPLY"   // 好友申请
#define EMMESSAGE_EXT_TYPE_FRIEND_APPLY_ACCEPTED @"EMMESSAGE_EXT_TYPE_FRIEND_APPLY_ACCEPTED"   // 好友申请被接受
#define EMMESSAGE_EXT_TYPE_FRIEND_DELETE  @"EMMESSAGE_EXT_TYPE_FRIEND_DELETE"  //删除好友
#define EMMESSAGE_EXT_TYPE_JITTER_APPLY @"EMMESSAGE_EXT_TYPE_JITTER_APPLY"   // 抖动
#define LITTLE_ACTION_TYPE_MOMODA @"little_action" //么么哒
#define LITTLE_ACTION_TYPE_MOMODA_VALUE @"MOMODA"
#define LITTLE_ACTION_TYPE_CHUO @"little_action" //戳一下
#define  LITTLE_ACTION_TYPE_CHUO_VALUE @"CHUO"


#define EMMESSAGE_EXT_TYPE_BURN_AFTER_READ_MSG @"EMMESSAGE_EXT_TYPE_BURN_AFTER_READ_MSG"// 阅后即焚消息


//  透传消息Action
#define ACTION_FRIEND_APPLY @"com.pocketsweet.FRIEND_APPLY"   // 好友申请
#define ACTION_FRIEND_APPLY_ACCEPTED @"com.pocketsweet.FRIEND_APPLY_ACCEPTED" //好友申请被接受
#define ACTION_NEW_LIKER @"com.pocketsweet.NEW_LIKER"   // 好友喜欢
#define ACTION_FRIEND_DELETE @"com.pocketsweet.FRIEND_DELETE"  //删除好友
#define ACTION_CHAT_APPLY_ACCEPT @"com.pocketsweet.CHAT_APPLY_ACCEPT"//申请通话

#define ACTION_NEW_RECOMMENT @"com.pocketsweet.RECOMMENT" //新的专属恋人
#define ACTION_AUTHENTICATE_SUCCEED @"com.pocketsweet.AUTHENTICATE_SUCCEED" //专属恋人申请成功
#define ACTION_AUTHENTICATE_FAILD @"com.pocketsweet.AUTHENTICATE_FAILD" //专属恋人申请失败

#define ACTION_NEW_UPDATE_PROFILE @"com.pocketsweet.UPDATE_PROFILE" //用户修改资料
//随机电话,双方点击喜欢发送透传
#define ACTION_CALL_LIKE @"com.pocketsweet.CALL_LIKE"

//用户封号,禁言通知, 变为普通人
#define ACTION_DISABLE_USER @"com.pocketsweet.DISABLE_USER" //封号
#define ACTION_FORBIDDEN_USER @"com.pocketsweet.FORBIDDEN_USER" //禁言
#define ACTION_RESET_USER @"com.pocketsweet.RESET_USER" //变为普通人



//普通人申请成为恋人的透传
#define ACTION_Pocketsweet_SWEET_APPLY @"com.pocketsweet.SWEET_APPLY" //恋人申请
#define ACTION_Pocketsweet_SWEET_ACCEPT @"com.pocketsweet.SWEET_ACCEPTED" //恋人接受
#define ACTION_Pocketsweet_SWEET_DELETE @"com.pocketsweet.SWEET_DELETE"//分手
//更换背景图
#define ACTION_Pocketsweet_SwEET_IMG @"com.pocketsweet.CHANGE_LOVER_BACKGROUND"

/**************融云配置,测试环境**************/
#define RONG_CLOUD_APP_ID @"8luwapkvu0r4l"
#define RONG_CLOUD_SYS_USERID @"10000"
#define RONG_CLOUD_SYS_USERNAME @"系统"
#define RONG_CLOUD_SYS_PORTRAITURI @"http://ycpub.qiniudn.com/icon_system_notifcation.png"



/**************新浪微博授权**************/
#define WEIBO_APP_KEY         @"3062358726"
#define WEIBO_REDIRECT_URI    @"https://api.weibo.com/oauth2/default.html"

/**************QQ微博授权**************/
#define QQ_APP_KEY          @"JVSuqFVQjNWJJvSI"
#define QQ_APP_ID           @"1104588970"

/**************友盟**************/
#define UM_KEY              @"54d30f69fd98c5174f000ac0"


// 用户聊天背景
#define CHAT_BACKGROUND_DIR @"chatBackground"
// 系统聊天背景
#define SYS_CHAT_BACKGROUND_DIR @"sysChatBackgroundDir"
#define SYS_CHAT_BACKGROUND_INFO @"backgroundInfo"

#endif

//0则不打印任何东西
#if 0

#define NSLog(FORMAT, ...) fprintf(stderr,"[%s:%d行] %s\n",[[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__, [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]);
#else

#define NSLog(FORMAT, ...) nil

#endif




//0则生产环境
#if DEBUG
/*********************LeanCloud配置,测试版本*********************/
//测试
#define AVOS_APP_ID @"gcwdqeukgz840k464sf9esimtk7rtx1joinbdkdsw5u46ghw"
#define AVOS_APP_KEY @"38zp9e6h0cjhsao8uv51tqae1vy4i09g466tc4dcw5kcujp3"

/**************环信配置, 测试环境***************/
#define EASEMOB_APPKEY @"xiaocan#molian"//测试
#define EASEMOB_APNS_CERT_NAME @"dev"  //测试

#else

/*********************LeanCloud配置,正式版本*********************/
////正式


#define AVOS_APP_ID @"74f4shodydbcqxuwqrkoehltwo5qr77dbe5dudp4ag7662vm"
#define AVOS_APP_KEY @"svxelvajnjjs6u83ea7xv399ivy0ygp04bp9igzsnp8nfyfi"

/**************环信配置, 测试环境***************/
#define EASEMOB_APPKEY @"xiaocan#pocketsweet"//上线
#define EASEMOB_APNS_CERT_NAME @"pro"  //上线

#endif


